import request from '@/utils/request';

// -----------------------------------------活动列表-----------------------------------------
// 列表
export function getPasswordList(params: any) {
    return request({
        url: '/scrm-api/console/market/password-red/list',
        params,
        noNeedLoading: true
    });
}
// 批量开始/结束
export function passwordChange(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/change',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
// 批量删除/删除
export function passwordDel(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/del',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
// 批量下载/下载
export function passwordDown(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/download',
        method: 'post',
        data
    });
}
// -----------------------------------------活动详情-----------------------------------------
// 新建
export function passwordCreate(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/add',
        method: 'post',
        data
    });
}
// 查看
export function passwordInfo(params: any) {
    return request({
        url: '/scrm-api/console/market/password-red/info',
        params
    });
}
// 编辑
export function passwordEdit(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/edit',
        method: 'post',
        data
    });
}
// 口令模板-下载
export function passwordTemDownload(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/passwordTemDownload'
    });
}
// 口令模板-上传
export function passwordCheckUpload(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/passwordCheckUpload',
        method: 'post',
        data
    });
}
// -----------------------------------------参与者明细-----------------------------------------
// 参与者/统计-基础数据
export function getBasisInfo(params: any) {
    return request({
        url: '/scrm-api/console/market/password-red/baseInfo',
        params
    });
}
// 列表
export function getpartakeList(params: any) {
    return request({
        url: '/scrm-api/console/market/password-red/partake/list',
        params
    });
}
// 发放红包
export function issueEnvelope(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/partake/issue',
        method: 'post',
        data
    });
}
// 导出
export function getExport(params: any) {
    return request({
        url: '/scrm-api/console/market/password-red/partake/export',
        params
    });
}
// -----------------------------------------统计-----------------------------------------
export function getStatis(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/statis',
        method: 'POST',
        data
    });
}
